package com.shwread.android.qysw.step.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.shwread.android.qysw.activity.healthy.GroupMyCreateFragment;
import com.shwread.android.qysw.activity.healthy.GroupMyGameFragment;
import com.shwread.android.qysw.activity.healthy.GroupPKActivity;

/**
 * Created by Fantasy on 16/4/2.
 */
public class GroupManageAdapter extends FragmentPagerAdapter {
    public static int TAB_COUNT = 2;

    public GroupManageAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int id) {
        switch (id) {
            case GroupPKActivity.TAB_MY_CREATE:
                GroupMyCreateFragment groupMyCreateFragment = new GroupMyCreateFragment();
                return groupMyCreateFragment;
            case GroupPKActivity.TAB_MY_GAME:
                GroupMyGameFragment groupMyGameFragment = new GroupMyGameFragment();
                return groupMyGameFragment;
        }
        return null;
    }

    @Override
    public int getCount() {
        return TAB_COUNT;
    }
}
